﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php foreach ($this->metainfo as $meta_key=>$meta_value){?>
	<?php if($meta_key == 'seotitle'):?>
	<title><?php echo $meta_value." | ".Yii::app()->name;?></title>
	<?php else:?>
	<meta name="<?php echo $meta_key?>" content="<?php echo $meta_value;?>"/>
	<?php endif;?>
<?php }?>

<?php 
if (isset(YII::app()->session['username']) && YII::app()->session['username']!="")
{
	$login_status=true;
	$username=YII::app()->session['username'];
	$email=YII::app()->session['email'];
}
else
	$login_status=false;

?>
<link href="/res/style/global.css" rel="stylesheet" type="text/css" />
<link href="/res/style/home.css" rel="stylesheet" type="text/css" />
<link href="/res/style/jquery.fancybox.css" rel="stylesheet" type="text/css" />
<link href="/res/style/jquery.fancybox-buttons.css" rel="stylesheet" type="text/css" />
<link href="/res/style/jquery.fancybox-thumbs.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/res/scripts/jquery.js"></script>
<script type="text/javascript" src="/res/scripts/js_game.js"></script>
<script type="text/javascript" src="/res/scripts/min_contentslider.js"></script>
<script type="text/javascript" src="/res/scripts/scroll.js"></script>
<script type="text/javascript" src="/res/scripts/slides.min.jquery.js"></script>
<script type="text/javascript" src="/res/scripts/scrolltopcontrol.js"></script>
<script type="text/javascript" src="/res/scripts/jquery.fancybox.js"></script>
<script type="text/javascript" src="/res/scripts/jquery.fancybox-buttons.js"></script>
<script type="text/javascript" src="/res/scripts/jquery.fancybox-thumbs.js"></script>
<!-- add by zhangqian -->
<script type="text/javascript" src=/res/scripts/common.js></script>
<script src="/res/scripts/jquery.validate.min.js"> </script>
<script src="/res/scripts/jquery.pstrength-min.1.2.js"> </script>
 <!-- -->
<script type="text/javascript">
$(document).ready(function(){
	//current menu
	$("#menu > ul > li").currentMenu({text: "Home", style: "curr"	});
	$(".tab").tabSwitch({ 
	tabContent:"tab_cont",     //内容部分样式名称
	currentClass:"curr",          //Tab当前项样式名称
	firstShow: 1                      //默认显示
	});
	$("#link1").showContent({closeStyle:"#close"});
	$("#link2").showContent({closeStyle:"#close2"});
	$("#link3").showContent({closeStyle:"#close3"});
	$("#link4").showContent({closeStyle:"#close4"});
	$(".fancybox").fancybox({
		openEffect	: 'none',
		closeEffect	: 'none',
		prevEffect : 'none',
		nextEffect : 'none',
		//closeBtn:false,
		helpers:{
				title:{
						type:'inside'
					}
			,  buttons	: {},
			thumbs	: {
					width	: 50,
					height	: 50
				}
			}
	});
});
$(function(){
	$("#menu > .nav > li").showMenu({
	effect:"fade",            // 动画效果，分为"show"、"fade"、"slide"三种
	speed:300               // 动画效果速度
	});
	$(".scrolltxt").textScroll({
		line: 1,                        //每次滚动的行数
		speed: 600,                //滚动的速度，单位毫秒
		interval: 2000,            //每次滚动的时间间隔
		hoverStop:true          //鼠标移上去是否暂停滚动
	});
	$('#slides').slides({
    preload: true,
    preloadImage: '/res/images/loading.gif',
    play: 5000,
    pause: 500,
    hoverPause: true
    });
	$(".showbtn").hover(function(){
			$(this).find(".showbg").show();								  
		},function(){
			$(this).find(".showbg").hide();	
    });	
});
</script>
</head>

<body>

<?php if ($login_status==false){?>
<div id="tapbar">
  <div class="logo">APP MELODY</div>
  <div class="rbox4"><a href="#show_w3" id="link3">Submission</a></div>
  <div class="showbtn"> <a href="javascript:void(0)" class="sbtn">botton</a>
    <div class="showbg">
      <div class="nrbox"><a href="#" class="facebook">Follow us</a><a href="#" class="twitter">Follow us</a></div>
    </div>
  </div> 
  <!-- showcont end -->
  <div class="rbox2"><a href="#" class="facebook fl">Facebook</a><a href="#" class="twitter fl">twitter</a><a href="#" class="google fl">google</a></div>
  <div class="rbox1"><a href="#show_w" id="link1" class="login fl">Login</a> <a href="#show_w2" id="link2" class="signup fr">Sign up</a></div>
</div>
  <?php 
}
else 
{?>
	<div id="tapbar">
	<div class="logo">APP MELODY</div>
	<div class="rbox4"><a href="#show_w3" id="link3">Submission</a></div>
	<div class="showbtn"> <a href="javascript:void(0)" class="sbtn">botton</a>
	<div class="showbg">
	<div class="nrbox"><a href="#" class="facebook">Follow us</a><a href="#" class="twitter">Follow us</a></div>
	</div>
	</div>
	<!-- showcont end -->
	<div class="rbox2"><a href="#" class="facebook fl">Facebook</a><a href="#" class="twitter fl">twitter</a><a href="#" class="google fl">google</a></div>
	<div class="user"><?php echo $email?><a href="#show_w4" id="link4" class="change">Change Password</a> <a href="/site/login_out" id="link4" class="logout">Logout</a></div>
	</div>
	<?php 
}
  	 ?>
 
<div class="clear"></div>
<!-- topbar end -->
<div id="header">
  <div class="logo"><a href="#">logo</a></div>
  <div class="adbanner"><img src="/res/images/ad_banner.jpg" width="652" height="72" /></div>
</div>
<!-- header end -->

<?php echo $content?>
</body>
</html>